﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Chinajade.Tribe;


namespace Glatterflug
{
    public partial class PluginSettingsUI : Form
    {
        //private static int Main(string[] args)
        //{
        //    Tribe.PackageName = "Glatterflug";

        //    new PluginSettingsUI("GlatterflugTest", new Version(0, 0)).ShowDialog();
        //    return (0);
        //}

        public PluginSettingsUI(string packageName, Version packageVersion)
        {
            _packageName = packageName;
            _packageVersion = packageVersion;

            InitializeComponent();

            string aboutPath = Path.Combine(Tribe.Paths.PluginResourcesDirectory, "About");


            this.Text = string.Format("{0} v{1}", _packageName, _packageVersion);

            pictureBoxAbout_AuthorPix.Load(Path.Combine(aboutPath, "chinajade.jpg"));
            richTextBoxAboutPlugin.LoadFile(Path.Combine(aboutPath, "About.rtf"));

            tabConfig.TabPages.Remove(tabPageDebug);
            tabConfig.SelectTab(tabPageAbout);
        }

        private void buttonAboutVersionHistory_Click(object sender, EventArgs e)
        {
            if (_versionHistoryDialog == null)
            {
                _versionHistoryDialog = new ReleaseNotesDialog(_packageName, _packageVersion);
                _versionHistoryDialog.ShowDialog();
                _versionHistoryDialog = null;
            }

            else
            {
                _versionHistoryDialog.BringToFront();
            }
        }

        private string _packageName;
        private Version _packageVersion;

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonApply_Click(object sender, EventArgs e)
        {
            // empty for now
        }

        private Form _versionHistoryDialog;

        private void tabPageTownRunConfig_Click(object sender, EventArgs e)
        {

        }

        private void radioButtonTownRun_GreyMail_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton15_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void groupBox2_Enter(object sender, EventArgs e)
        {

        }

        private void radioButton14_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void labelTownRun_LastTownRun_Click(object sender, EventArgs e)
        {

        }

        private void groupBoxTownRun_GreyHandling_Enter(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void radioButton10_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton11_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton9_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton12_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void labelTownRun_LastTownRunLabel_Click(object sender, EventArgs e)
        {

        }

        private void labelBreaks_LastBreakTaken_Click(object sender, EventArgs e)
        {

        }

        private void radioButton16_CheckedChanged(object sender, EventArgs e)
        {

        }
    }
}
